           package com.java.diagnostics.visualizer.impl.sources;
           
           //import java.util.prefs.Preferences;

import com.java.diagnostics.visualizer.impl.GCAndMemoryVisualizerImplPreferenceInitalizer;
           import com.java.diagnostics.visualizer.impl.preferences.GCAndMemoryVisualizerPreferenceInitializer;
           import com.java.diagnostics.visualizer.impl.preferences.SmartPreferences;
           import org.eclipse.core.runtime.preferences.IScopeContext;
           import org.eclipse.core.runtime.preferences.InstanceScope;
           import org.osgi.service.prefs.Preferences;
           
           public class SourcePreferenceHelper
           {
             private SmartPreferences prefs;
             public static final String BUFFER_SIZE = SourcePreferenceHelper.class + "BUFFER_SIZE";
           
             public SourcePreferenceHelper()
             {
               IScopeContext scope = new InstanceScope();
               this.prefs = 
                 GCAndMemoryVisualizerImplPreferenceInitalizer.getInstance().getPreferences(scope);
             }
           
             public int getBufferSize()
             {
               return this.prefs.getInt(BUFFER_SIZE);
             }
           
             public static void initializeDefaults(Preferences prefs)
             {
               prefs.putInt(BUFFER_SIZE, 500);
             }
           }

